(* Options:
Date: 2025-11-06 11:47:33
Version: 8.91
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: http://localhost:20000

//GlobalNamespace: 
//MakeDataContractsExtensible: False
//AddReturnMarker: True
//AddDescriptionAsComments: True
//AddDataContractAttributes: False
//AddIndexesToDataMembers: False
//AddGeneratedCodeAttributes: False
//AddResponseStatus: False
//AddImplicitVersion: 
//ExportValueTypes: False
//IncludeTypes: 
//ExcludeTypes: 
//InitializeCollections: False
//AddNamespaces: 
*)

namespace ServiceStack

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<DataContract>]
    [<AllowNullLiteral>]
    type AiContent() = 
        ///<summary>
        ///The type of the content part.
        ///</summary>
        [<DataMember(Name="type")>]
        member val Type:String = null with get,set

    ///<summary>
    ///The tool calls generated by the model, such as function calls.
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type ToolCall() = 
        ///<summary>
        ///The ID of the tool call.
        ///</summary>
        [<DataMember(Name="id")>]
        member val Id:String = null with get,set

        ///<summary>
        ///The type of the tool. Currently, only `function` is supported.
        ///</summary>
        [<DataMember(Name="type")>]
        member val Type:String = null with get,set

        ///<summary>
        ///The function that the model called.
        ///</summary>
        [<DataMember(Name="function")>]
        member val Function:String = null with get,set

    ///<summary>
    ///A list of messages comprising the conversation so far.
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiMessage() = 
        ///<summary>
        ///The contents of the message.
        ///</summary>
        [<DataMember(Name="content")>]
        member val Content:ResizeArray<AiContent> = null with get,set

        ///<summary>
        ///The role of the author of this message. Valid values are `system`, `user`, `assistant` and `tool`.
        ///</summary>
        [<DataMember(Name="role")>]
        member val Role:String = null with get,set

        ///<summary>
        ///An optional name for the participant. Provides the model information to differentiate between participants of the same role.
        ///</summary>
        [<DataMember(Name="name")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The tool calls generated by the model, such as function calls.
        ///</summary>
        [<DataMember(Name="tool_calls")>]
        member val ToolCalls:ResizeArray<ToolCall> = null with get,set

        ///<summary>
        ///Tool call that this message is responding to.
        ///</summary>
        [<DataMember(Name="tool_call_id")>]
        member val ToolCallId:String = null with get,set

    ///<summary>
    ///Parameters for audio output. Required when audio output is requested with modalities: [audio]
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiChatAudio() = 
        ///<summary>
        ///Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
        ///</summary>
        [<DataMember(Name="format")>]
        member val Format:String = null with get,set

        ///<summary>
        ///The voice the model uses to respond. Supported voices are alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, and shimmer.
        ///</summary>
        [<DataMember(Name="voice")>]
        member val Voice:String = null with get,set

    type ResponseFormat =
        | Text = 0
        | JsonObject = 1

    [<DataContract>]
    [<AllowNullLiteral>]
    type AiResponseFormat() = 
        ///<summary>
        ///An object specifying the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.
        ///</summary>
        [<DataMember(Name="response_format")>]
        member val Type:ResponseFormat = new ResponseFormat() with get,set

    type ToolType =
        | Function = 0

    [<DataContract>]
    [<AllowNullLiteral>]
    type Tool() = 
        ///<summary>
        ///The type of the tool. Currently, only function is supported.
        ///</summary>
        [<DataMember(Name="type")>]
        member val Type:ToolType = new ToolType() with get,set

    ///<summary>
    ///Annotations for the message, when applicable, as when using the web search tool.
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type UrlCitation() = 
        ///<summary>
        ///The index of the last character of the URL citation in the message.
        ///</summary>
        [<DataMember(Name="end_index")>]
        member val EndIndex:Int32 = new Int32() with get,set

        ///<summary>
        ///The index of the first character of the URL citation in the message.
        ///</summary>
        [<DataMember(Name="start_index")>]
        member val StartIndex:Int32 = new Int32() with get,set

        ///<summary>
        ///The title of the web resource.
        ///</summary>
        [<DataMember(Name="title")>]
        member val Title:String = null with get,set

        ///<summary>
        ///The URL of the web resource.
        ///</summary>
        [<DataMember(Name="url")>]
        member val Url:String = null with get,set

    ///<summary>
    ///Annotations for the message, when applicable, as when using the web search tool.
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type ChoiceAnnotation() = 
        ///<summary>
        ///The type of the URL citation. Always url_citation.
        ///</summary>
        [<DataMember(Name="type")>]
        member val Type:String = null with get,set

        ///<summary>
        ///A URL citation when using web search.
        ///</summary>
        [<DataMember(Name="url_citation")>]
        member val UrlCitation:UrlCitation = null with get,set

    ///<summary>
    ///If the audio output modality is requested, this object contains data about the audio response from the model.
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type ChoiceAudio() = 
        ///<summary>
        ///Base64 encoded audio bytes generated by the model, in the format specified in the request.
        ///</summary>
        [<DataMember(Name="data")>]
        member val Data:String = null with get,set

        ///<summary>
        ///The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.
        ///</summary>
        [<DataMember(Name="expires_at")>]
        member val ExpiresAt:Int32 = new Int32() with get,set

        ///<summary>
        ///Unique identifier for this audio response.
        ///</summary>
        [<DataMember(Name="id")>]
        member val Id:String = null with get,set

        ///<summary>
        ///Transcript of the audio generated by the model.
        ///</summary>
        [<DataMember(Name="transcript")>]
        member val Transcript:String = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type ChoiceMessage() = 
        ///<summary>
        ///The contents of the message.
        ///</summary>
        [<DataMember(Name="content")>]
        member val Content:String = null with get,set

        ///<summary>
        ///The refusal message generated by the model.
        ///</summary>
        [<DataMember(Name="refusal")>]
        member val Refusal:String = null with get,set

        ///<summary>
        ///The reasoning process used by the model.
        ///</summary>
        [<DataMember(Name="reasoning")>]
        member val Reasoning:String = null with get,set

        ///<summary>
        ///The role of the author of this message.
        ///</summary>
        [<DataMember(Name="role")>]
        member val Role:String = null with get,set

        ///<summary>
        ///Annotations for the message, when applicable, as when using the web search tool.
        ///</summary>
        [<DataMember(Name="annotations")>]
        member val Annotations:ResizeArray<ChoiceAnnotation> = null with get,set

        ///<summary>
        ///If the audio output modality is requested, this object contains data about the audio response from the model.
        ///</summary>
        [<DataMember(Name="audio")>]
        member val Audio:ChoiceAudio = null with get,set

        ///<summary>
        ///The tool calls generated by the model, such as function calls.
        ///</summary>
        [<DataMember(Name="tool_calls")>]
        member val ToolCalls:ResizeArray<ToolCall> = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type Choice() = 
        ///<summary>
        ///The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, content_filter if content was omitted due to a flag from our content filters, tool_calls if the model called a tool
        ///</summary>
        [<DataMember(Name="finish_reason")>]
        member val FinishReason:String = null with get,set

        ///<summary>
        ///The index of the choice in the list of choices.
        ///</summary>
        [<DataMember(Name="index")>]
        member val Index:Int32 = new Int32() with get,set

        ///<summary>
        ///A chat completion message generated by the model.
        ///</summary>
        [<DataMember(Name="message")>]
        member val Message:ChoiceMessage = null with get,set

    ///<summary>
    ///Usage statistics for the completion request.
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiCompletionUsage() = 
        ///<summary>
        ///When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
        ///</summary>
        [<DataMember(Name="accepted_prediction_tokens")>]
        member val AcceptedPredictionTokens:Int32 = new Int32() with get,set

        ///<summary>
        ///Audio input tokens generated by the model.
        ///</summary>
        [<DataMember(Name="audio_tokens")>]
        member val AudioTokens:Int32 = new Int32() with get,set

        ///<summary>
        ///Tokens generated by the model for reasoning.
        ///</summary>
        [<DataMember(Name="reasoning_tokens")>]
        member val ReasoningTokens:Int32 = new Int32() with get,set

        ///<summary>
        ///When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion.
        ///</summary>
        [<DataMember(Name="rejected_prediction_tokens")>]
        member val RejectedPredictionTokens:Int32 = new Int32() with get,set

    ///<summary>
    ///Breakdown of tokens used in the prompt.
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiPromptUsage() = 
        ///<summary>
        ///When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
        ///</summary>
        [<DataMember(Name="accepted_prediction_tokens")>]
        member val AcceptedPredictionTokens:Int32 = new Int32() with get,set

        ///<summary>
        ///Audio input tokens present in the prompt.
        ///</summary>
        [<DataMember(Name="audio_tokens")>]
        member val AudioTokens:Int32 = new Int32() with get,set

        ///<summary>
        ///Cached tokens present in the prompt.
        ///</summary>
        [<DataMember(Name="cached_tokens")>]
        member val CachedTokens:Int32 = new Int32() with get,set

    ///<summary>
    ///Usage statistics for the completion request.
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiUsage() = 
        ///<summary>
        ///Number of tokens in the generated completion.
        ///</summary>
        [<DataMember(Name="completion_tokens")>]
        member val CompletionTokens:Int32 = new Int32() with get,set

        ///<summary>
        ///Number of tokens in the prompt.
        ///</summary>
        [<DataMember(Name="prompt_tokens")>]
        member val PromptTokens:Int32 = new Int32() with get,set

        ///<summary>
        ///Total number of tokens used in the request (prompt + completion).
        ///</summary>
        [<DataMember(Name="total_tokens")>]
        member val TotalTokens:Int32 = new Int32() with get,set

        ///<summary>
        ///Breakdown of tokens used in a completion.
        ///</summary>
        [<DataMember(Name="completion_tokens_details")>]
        member val CompletionTokensDetails:AiCompletionUsage = null with get,set

        ///<summary>
        ///Breakdown of tokens used in the prompt.
        ///</summary>
        [<DataMember(Name="prompt_tokens_details")>]
        member val PromptTokensDetails:AiPromptUsage = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type ModelUsage() = 
        [<DataMember>]
        member val Cost:String = null with get,set

        [<DataMember>]
        member val Input:String = null with get,set

        [<DataMember>]
        member val Output:String = null with get,set

        [<DataMember>]
        member val Duration:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<DataMember(Name="completion_tokens")>]
        member val CompletionTokens:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<DataMember>]
        member val InputCachedTokens:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<DataMember>]
        member val OutputCachedTokens:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<DataMember(Name="audio_tokens")>]
        member val AudioTokens:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<DataMember(Name="reasoning_tokens")>]
        member val ReasoningTokens:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<DataMember>]
        member val TotalTokens:Nullable<Int32> = new Nullable<Int32>() with get,set

    [<AllowNullLiteral>]
    type ChatCompletionLog() = 
        member val Id:Int64 = new Int64() with get,set
        member val RefId:String = null with get,set
        member val UserId:String = null with get,set
        member val ApiKey:String = null with get,set
        member val Model:String = null with get,set
        member val Provider:String = null with get,set
        member val UserPrompt:String = null with get,set
        member val Answer:String = null with get,set
        [<StringLength(Int32.MaxValue)>]
        member val RequestBody:String = null with get,set

        [<StringLength(Int32.MaxValue)>]
        member val ResponseBody:String = null with get,set

        member val ErrorCode:String = null with get,set
        member val Error:ResponseStatus = null with get,set
        member val CreatedDate:DateTime = new DateTime() with get,set
        member val Tag:String = null with get,set
        member val DurationMs:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val PromptTokens:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val CompletionTokens:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Cost:Decimal = new Decimal() with get,set
        member val ProviderRef:String = null with get,set
        member val ProviderModel:String = null with get,set
        member val FinishReason:String = null with get,set
        member val Usage:ModelUsage = null with get,set
        member val ThreadId:String = null with get,set
        member val Title:String = null with get,set
        member val Meta:Dictionary<String, String> = null with get,set

    [<AllowNullLiteral>]
    type ChatCompletionStat() = 
        member val Name:String = null with get,set
        member val Requests:Int32 = new Int32() with get,set
        member val InputTokens:Int32 = new Int32() with get,set
        member val OutputTokens:Int32 = new Int32() with get,set
        member val Cost:Decimal = new Decimal() with get,set

    ///<summary>
    ///Text content part
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiTextContent() = 
        inherit AiContent()
        ///<summary>
        ///The text content.
        ///</summary>
        [<DataMember(Name="text")>]
        member val Text:String = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type AiImageUrl() = 
        ///<summary>
        ///Either a URL of the image or the base64 encoded image data.
        ///</summary>
        [<DataMember(Name="url")>]
        member val Url:String = null with get,set

    ///<summary>
    ///Image content part
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiImageContent() = 
        inherit AiContent()
        ///<summary>
        ///The image for this content.
        ///</summary>
        [<DataMember(Name="image_url")>]
        member val ImageUrl:AiImageUrl = null with get,set

    ///<summary>
    ///Audio content part
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiInputAudio() = 
        ///<summary>
        ///URL or Base64 encoded audio data.
        ///</summary>
        [<DataMember(Name="data")>]
        member val Data:String = null with get,set

        ///<summary>
        ///The format of the encoded audio data. Currently supports 'wav' and 'mp3'.
        ///</summary>
        [<DataMember(Name="format")>]
        member val Format:String = null with get,set

    ///<summary>
    ///Audio content part
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiAudioContent() = 
        inherit AiContent()
        ///<summary>
        ///The audio input for this content.
        ///</summary>
        [<DataMember(Name="input_audio")>]
        member val InputAudio:AiInputAudio = null with get,set

    ///<summary>
    ///File content part
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiFile() = 
        ///<summary>
        ///The URL or base64 encoded file data, used when passing the file to the model as a string.
        ///</summary>
        [<DataMember(Name="file_data")>]
        member val FileData:String = null with get,set

        ///<summary>
        ///The name of the file, used when passing the file to the model as a string.
        ///</summary>
        [<DataMember(Name="filename")>]
        member val Filename:String = null with get,set

        ///<summary>
        ///The ID of an uploaded file to use as input.
        ///</summary>
        [<DataMember(Name="file_id")>]
        member val FileId:String = null with get,set

    ///<summary>
    ///File content part
    ///</summary>
    [<DataContract>]
    [<AllowNullLiteral>]
    type AiFileContent() = 
        inherit AiContent()
        ///<summary>
        ///The file input for this content.
        ///</summary>
        [<DataMember(Name="file")>]
        member val File:AiFile = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type ChatResponse() = 
        ///<summary>
        ///A unique identifier for the chat completion.
        ///</summary>
        [<DataMember(Name="id")>]
        member val Id:String = null with get,set

        ///<summary>
        ///A list of chat completion choices. Can be more than one if n is greater than 1.
        ///</summary>
        [<DataMember(Name="choices")>]
        member val Choices:ResizeArray<Choice> = null with get,set

        ///<summary>
        ///The Unix timestamp (in seconds) of when the chat completion was created.
        ///</summary>
        [<DataMember(Name="created")>]
        member val Created:Int64 = new Int64() with get,set

        ///<summary>
        ///The model used for the chat completion.
        ///</summary>
        [<DataMember(Name="model")>]
        member val Model:String = null with get,set

        ///<summary>
        ///This fingerprint represents the backend configuration that the model runs with.
        ///</summary>
        [<DataMember(Name="system_fingerprint")>]
        member val SystemFingerprint:String = null with get,set

        ///<summary>
        ///The object type, which is always chat.completion.
        ///</summary>
        [<DataMember(Name="object")>]
        member val Object:String = null with get,set

        ///<summary>
        ///Specifies the processing type used for serving the request.
        ///</summary>
        [<DataMember(Name="service_tier")>]
        member val ServiceTier:String = null with get,set

        ///<summary>
        ///Usage statistics for the completion request.
        ///</summary>
        [<DataMember(Name="usage")>]
        member val Usage:AiUsage = null with get,set

        ///<summary>
        ///The provider used for the chat completion.
        ///</summary>
        [<DataMember(Name="provider")>]
        member val Provider:String = null with get,set

        ///<summary>
        ///Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.
        ///</summary>
        [<DataMember(Name="metadata")>]
        member val Metadata:Dictionary<String, String> = null with get,set

        [<DataMember(Name="responseStatus")>]
        member val ResponseStatus:ResponseStatus = null with get,set

    [<AllowNullLiteral>]
    type AdminMonthlyChatCompletionAnalyticsResponse() = 
        member val Month:String = null with get,set
        member val AvailableMonths:ResizeArray<String> = null with get,set
        member val ModelStats:ResizeArray<ChatCompletionStat> = null with get,set
        member val ProviderStats:ResizeArray<ChatCompletionStat> = null with get,set
        member val DailyStats:ResizeArray<ChatCompletionStat> = null with get,set

    [<AllowNullLiteral>]
    type AdminDailyChatCompletionAnalyticsResponse() = 
        member val ModelStats:ResizeArray<ChatCompletionStat> = null with get,set
        member val ProviderStats:ResizeArray<ChatCompletionStat> = null with get,set

    ///<summary>
    ///Chat Completions API (OpenAI-Compatible)
    ///</summary>
    [<Route("/v1/chat/completions", "POST")>]
    [<DataContract>]
    [<AllowNullLiteral>]
    type ChatCompletion() = 
        interface IReturn<ChatResponse>
        interface IPost
        ///<summary>
        ///The messages to generate chat completions for.
        ///</summary>
        [<DataMember(Name="messages")>]
        member val Messages:ResizeArray<AiMessage> = null with get,set

        ///<summary>
        ///ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API
        ///</summary>
        [<DataMember(Name="model")>]
        member val Model:String = null with get,set

        ///<summary>
        ///Parameters for audio output. Required when audio output is requested with modalities: [audio]
        ///</summary>
        [<DataMember(Name="audio")>]
        member val Audio:AiChatAudio = null with get,set

        ///<summary>
        ///Modify the likelihood of specified tokens appearing in the completion.
        ///</summary>
        [<DataMember(Name="logit_bias")>]
        member val LogitBias:Dictionary<Int32, Int32> = null with get,set

        ///<summary>
        ///Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.
        ///</summary>
        [<DataMember(Name="metadata")>]
        member val Metadata:Dictionary<String, String> = null with get,set

        ///<summary>
        ///Constrains effort on reasoning for reasoning models. Currently supported values are minimal, low, medium, and high (none, default). Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
        ///</summary>
        [<DataMember(Name="reasoning_effort")>]
        member val ReasoningEffort:String = null with get,set

        ///<summary>
        ///An object specifying the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`. Setting Type to ResponseFormat.JsonObject enables JSON mode, which guarantees the message the model generates is valid JSON.
        ///</summary>
        [<DataMember(Name="response_format")>]
        member val ResponseFormat:AiResponseFormat = null with get,set

        ///<summary>
        ///Specifies the processing type used for serving the request.
        ///</summary>
        [<DataMember(Name="service_tier")>]
        member val ServiceTier:String = null with get,set

        ///<summary>
        ///A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user.
        ///</summary>
        [<DataMember(Name="safety_identifier")>]
        member val SafetyIdentifier:String = null with get,set

        ///<summary>
        ///Up to 4 sequences where the API will stop generating further tokens.
        ///</summary>
        [<DataMember(Name="stop")>]
        member val Stop:ResizeArray<String> = null with get,set

        ///<summary>
        ///Output types that you would like the model to generate. Most models are capable of generating text, which is the default:
        ///</summary>
        [<DataMember(Name="modalities")>]
        member val Modalities:ResizeArray<String> = null with get,set

        ///<summary>
        ///Used by OpenAI to cache responses for similar requests to optimize your cache hit rates.
        ///</summary>
        [<DataMember(Name="prompt_cache_key")>]
        member val PromptCacheKey:String = null with get,set

        ///<summary>
        ///A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
        ///</summary>
        [<DataMember(Name="tools")>]
        member val Tools:ResizeArray<Tool> = null with get,set

        ///<summary>
        ///Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose responses. Currently supported values are low, medium, and high.
        ///</summary>
        [<DataMember(Name="verbosity")>]
        member val Verbosity:String = null with get,set

        ///<summary>
        ///What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
        ///</summary>
        [<DataMember(Name="temperature")>]
        member val Temperature:Nullable<Double> = new Nullable<Double>() with get,set

        ///<summary>
        ///An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.
        ///</summary>
        [<DataMember(Name="max_completion_tokens")>]
        member val MaxCompletionTokens:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
        ///</summary>
        [<DataMember(Name="top_logprobs")>]
        member val TopLogprobs:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
        ///</summary>
        [<DataMember(Name="top_p")>]
        member val TopP:Nullable<Double> = new Nullable<Double>() with get,set

        ///<summary>
        ///Number between `-2.0` and `2.0`. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
        ///</summary>
        [<DataMember(Name="frequency_penalty")>]
        member val FrequencyPenalty:Nullable<Double> = new Nullable<Double>() with get,set

        ///<summary>
        ///Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
        ///</summary>
        [<DataMember(Name="presence_penalty")>]
        member val PresencePenalty:Nullable<Double> = new Nullable<Double>() with get,set

        ///<summary>
        ///This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.
        ///</summary>
        [<DataMember(Name="seed")>]
        member val Seed:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.
        ///</summary>
        [<DataMember(Name="n")>]
        member val N:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Whether or not to store the output of this chat completion request for use in our model distillation or evals products.
        ///</summary>
        [<DataMember(Name="store")>]
        member val Store:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
        ///</summary>
        [<DataMember(Name="logprobs")>]
        member val Logprobs:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///Whether to enable parallel function calling during tool use.
        ///</summary>
        [<DataMember(Name="parallel_tool_calls")>]
        member val ParallelToolCalls:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///Whether to enable thinking mode for some Qwen models and providers.
        ///</summary>
        [<DataMember(Name="enable_thinking")>]
        member val EnableThinking:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a `data: [DONE]` message.
        ///</summary>
        [<DataMember(Name="stream")>]
        member val Stream:Nullable<Boolean> = new Nullable<Boolean>() with get,set

    [<AllowNullLiteral>]
    type AdminQueryChatCompletionLogs() = 
        inherit QueryDb<ChatCompletionLog>()
        interface IReturn<QueryResponse<ChatCompletionLog>>
        member val Month:Nullable<DateTime> = new Nullable<DateTime>() with get,set

    [<AllowNullLiteral>]
    type AdminMonthlyChatCompletionAnalytics() = 
        interface IReturn<AdminMonthlyChatCompletionAnalyticsResponse>
        interface IGet
        member val Month:Nullable<DateTime> = new Nullable<DateTime>() with get,set

    [<AllowNullLiteral>]
    type AdminDailyChatCompletionAnalytics() = 
        interface IReturn<AdminDailyChatCompletionAnalyticsResponse>
        interface IGet
        member val Day:Nullable<DateTime> = new Nullable<DateTime>() with get,set

